﻿// (c) Norbert Huffschmid
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.

using System.ServiceModel;
using NProtocol;
using NProtocol.Rtp.Stack;

namespace ShoutBox.Service
{
    /// <summary>
    /// Shoutbox endpoint controller client interface
    /// </summary>
    [ServiceKnownType(typeof(RtpSessionMember))]
    public interface IShoutBoxEndPointControllerCallback
    {
        /// <summary>
        /// Callback method when a session member's property has changed
        /// </summary>
        /// <param name="propertyName">Name of changed property</param>
        /// <param name="sessionMember">Session member</param>
        [OperationContract(IsOneWay = true)]
        void OnSessionMemberPropertyChanged(string propertyName, ISessionMember sessionMember);

        /// <summary>
        /// Callback method when a session member has been added
        /// </summary>
        /// <param name="sessionMember">Session member added</param>
        [OperationContract(IsOneWay = true)]
        void OnSessionMembersAdded(ISessionMember sessionMember);

        /// <summary>
        /// Callback method when a session member has been removed
        /// </summary>
        /// <param name="sessionMember">Session member removed</param>
        [OperationContract(IsOneWay = true)]
        void OnSessionMembersRemoved(ISessionMember sessionMember);

        /// <summary>
        /// Callback method when session members have been reset
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void OnSessionMembersReset();

        /// <summary>
        /// Callback method when the shoutbox client should shut down
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void OnShutDown();
    }
}
